replace missing values categorical variables in r